package com.ruoyi.project.module.dictionary.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.dictionary.mapper.DictionaryMapper;
import com.ruoyi.project.module.dictionary.domain.Dictionarys;
import com.ruoyi.common.support.Convert;

/**
 * 宠物字典 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-16
 */
@Service("di")
public class DictionaryServiceImpl implements IDictionaryService 
{
	@Autowired
	private DictionaryMapper dictionaryMapper;


	/**
     * 查询宠物字典信息
     * 
     * @param id 宠物字典ID
     * @return 宠物字典信息
     */
    @Override
	public Dictionarys selectDictionaryById(Integer id)
	{
	    return dictionaryMapper.selectDictionaryById(id);
	}
	
	/**
     * 查询宠物字典列表
     * 
     * @param dictionary 宠物字典信息
     * @return 宠物字典集合
     */
	@Override
	public List<Dictionarys> selectDictionaryList(Dictionarys dictionary)
	{
	    return dictionaryMapper.selectDictionaryList(dictionary);
	}
	
    /**
     * 新增宠物字典
     * 
     * @param dictionary 宠物字典信息
     * @return 结果
     */
	@Override
	public int insertDictionary(Dictionarys dictionary)
	{
	    return dictionaryMapper.insertDictionary(dictionary);
	}
	
	/**
     * 修改宠物字典
     * 
     * @param dictionary 宠物字典信息
     * @return 结果
     */
	@Override
	public int updateDictionary(Dictionarys dictionary)
	{
	    return dictionaryMapper.updateDictionary(dictionary);
	}

	/**
     * 删除宠物字典对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDictionaryByIds(String ids)
	{
		return dictionaryMapper.deleteDictionaryByIds(Convert.toStrArray(ids));
	}
	@Override
	public  List<Dictionarys> dictionary8(){

		return  dictionaryMapper.dictionary8();
	}
	
}
